package com.chx.mapper;

import com.chx.annotation.AutoFill;
import com.chx.annotation.AutoFillOrder;
import com.chx.dto.StockInOrderPageQueryDto;
import com.chx.entity.StockInOrders;
import com.chx.enumeration.OperationType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Author cp-月入过万
 * @Date 2025/5/31
 */
@Mapper
public interface StockInOrderMapper {
     @AutoFillOrder(OperationType.INSERT)
     void insert(StockInOrders stockInOrders);

     @AutoFillOrder(OperationType.UPDATE)
     void update(StockInOrders stockInOrders);

     @Select( "select * from stock_in_orders where order_id = #{id}")
     StockInOrders getById(Long id);

     Page<StockInOrders> page(StockInOrderPageQueryDto stockInOrderPageQueryDto);
}
